/*
 * XML Type:  Mail
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Mail
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Mail(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class MailImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Mail
{
    
    public MailImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName USERID$0 = 
        new javax.xml.namespace.QName("", "USERID");
    private static final javax.xml.namespace.QName DTCREATED$2 = 
        new javax.xml.namespace.QName("", "DTCREATED");
    private static final javax.xml.namespace.QName FROM$4 = 
        new javax.xml.namespace.QName("", "FROM");
    private static final javax.xml.namespace.QName TO$6 = 
        new javax.xml.namespace.QName("", "TO");
    private static final javax.xml.namespace.QName SUBJECT$8 = 
        new javax.xml.namespace.QName("", "SUBJECT");
    private static final javax.xml.namespace.QName MSGBODY$10 = 
        new javax.xml.namespace.QName("", "MSGBODY");
    private static final javax.xml.namespace.QName INCIMAGES$12 = 
        new javax.xml.namespace.QName("", "INCIMAGES");
    private static final javax.xml.namespace.QName USEHTML$14 = 
        new javax.xml.namespace.QName("", "USEHTML");
    
    
    /**
     * Gets the "USERID" element
     */
    public java.lang.String getUSERID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERID$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "USERID" element
     */
    public net.ofx.types.x2003.x04.IdType xgetUSERID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.IdType target = null;
            target = (net.ofx.types.x2003.x04.IdType)get_store().find_element_user(USERID$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "USERID" element
     */
    public void setUSERID(java.lang.String userid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERID$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(USERID$0);
            }
            target.setStringValue(userid);
        }
    }
    
    /**
     * Sets (as xml) the "USERID" element
     */
    public void xsetUSERID(net.ofx.types.x2003.x04.IdType userid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.IdType target = null;
            target = (net.ofx.types.x2003.x04.IdType)get_store().find_element_user(USERID$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.IdType)get_store().add_element_user(USERID$0);
            }
            target.set(userid);
        }
    }
    
    /**
     * Gets the "DTCREATED" element
     */
    public java.lang.String getDTCREATED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTCREATED$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTCREATED" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTCREATED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTCREATED$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DTCREATED" element
     */
    public void setDTCREATED(java.lang.String dtcreated)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTCREATED$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTCREATED$2);
            }
            target.setStringValue(dtcreated);
        }
    }
    
    /**
     * Sets (as xml) the "DTCREATED" element
     */
    public void xsetDTCREATED(net.ofx.types.x2003.x04.DateTimeType dtcreated)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTCREATED$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTCREATED$2);
            }
            target.set(dtcreated);
        }
    }
    
    /**
     * Gets the "FROM" element
     */
    public java.lang.String getFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROM$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "FROM" element
     */
    public net.ofx.types.x2003.x04.GenericNameType xgetFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(FROM$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "FROM" element
     */
    public void setFROM(java.lang.String from)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROM$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FROM$4);
            }
            target.setStringValue(from);
        }
    }
    
    /**
     * Sets (as xml) the "FROM" element
     */
    public void xsetFROM(net.ofx.types.x2003.x04.GenericNameType from)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(FROM$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.GenericNameType)get_store().add_element_user(FROM$4);
            }
            target.set(from);
        }
    }
    
    /**
     * Gets the "TO" element
     */
    public java.lang.String getTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TO$6, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "TO" element
     */
    public net.ofx.types.x2003.x04.GenericNameType xgetTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(TO$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "TO" element
     */
    public void setTO(java.lang.String to)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TO$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TO$6);
            }
            target.setStringValue(to);
        }
    }
    
    /**
     * Sets (as xml) the "TO" element
     */
    public void xsetTO(net.ofx.types.x2003.x04.GenericNameType to)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(TO$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.GenericNameType)get_store().add_element_user(TO$6);
            }
            target.set(to);
        }
    }
    
    /**
     * Gets the "SUBJECT" element
     */
    public java.lang.String getSUBJECT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBJECT$8, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "SUBJECT" element
     */
    public net.ofx.types.x2003.x04.SubjectType xgetSUBJECT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SubjectType target = null;
            target = (net.ofx.types.x2003.x04.SubjectType)get_store().find_element_user(SUBJECT$8, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SUBJECT" element
     */
    public void setSUBJECT(java.lang.String subject)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBJECT$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SUBJECT$8);
            }
            target.setStringValue(subject);
        }
    }
    
    /**
     * Sets (as xml) the "SUBJECT" element
     */
    public void xsetSUBJECT(net.ofx.types.x2003.x04.SubjectType subject)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SubjectType target = null;
            target = (net.ofx.types.x2003.x04.SubjectType)get_store().find_element_user(SUBJECT$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SubjectType)get_store().add_element_user(SUBJECT$8);
            }
            target.set(subject);
        }
    }
    
    /**
     * Gets the "MSGBODY" element
     */
    public java.lang.String getMSGBODY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MSGBODY$10, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "MSGBODY" element
     */
    public net.ofx.types.x2003.x04.MessageBodyType xgetMSGBODY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageBodyType target = null;
            target = (net.ofx.types.x2003.x04.MessageBodyType)get_store().find_element_user(MSGBODY$10, 0);
            return target;
        }
    }
    
    /**
     * Sets the "MSGBODY" element
     */
    public void setMSGBODY(java.lang.String msgbody)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MSGBODY$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MSGBODY$10);
            }
            target.setStringValue(msgbody);
        }
    }
    
    /**
     * Sets (as xml) the "MSGBODY" element
     */
    public void xsetMSGBODY(net.ofx.types.x2003.x04.MessageBodyType msgbody)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageBodyType target = null;
            target = (net.ofx.types.x2003.x04.MessageBodyType)get_store().find_element_user(MSGBODY$10, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.MessageBodyType)get_store().add_element_user(MSGBODY$10);
            }
            target.set(msgbody);
        }
    }
    
    /**
     * Gets the "INCIMAGES" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getINCIMAGES()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INCIMAGES$12, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "INCIMAGES" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetINCIMAGES()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(INCIMAGES$12, 0);
            return target;
        }
    }
    
    /**
     * Sets the "INCIMAGES" element
     */
    public void setINCIMAGES(net.ofx.types.x2003.x04.BooleanType.Enum incimages)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INCIMAGES$12, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INCIMAGES$12);
            }
            target.setEnumValue(incimages);
        }
    }
    
    /**
     * Sets (as xml) the "INCIMAGES" element
     */
    public void xsetINCIMAGES(net.ofx.types.x2003.x04.BooleanType incimages)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(INCIMAGES$12, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(INCIMAGES$12);
            }
            target.set(incimages);
        }
    }
    
    /**
     * Gets the "USEHTML" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getUSEHTML()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USEHTML$14, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "USEHTML" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetUSEHTML()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(USEHTML$14, 0);
            return target;
        }
    }
    
    /**
     * Sets the "USEHTML" element
     */
    public void setUSEHTML(net.ofx.types.x2003.x04.BooleanType.Enum usehtml)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USEHTML$14, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(USEHTML$14);
            }
            target.setEnumValue(usehtml);
        }
    }
    
    /**
     * Sets (as xml) the "USEHTML" element
     */
    public void xsetUSEHTML(net.ofx.types.x2003.x04.BooleanType usehtml)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(USEHTML$14, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(USEHTML$14);
            }
            target.set(usehtml);
        }
    }
}
